# 代码编写者： 李朔
# 开发时间： 2021/9/6 19:51
nums=[5]
target=5
def search(nums,target):
    f,e=0,len(nums)-1
    # print(mi#d)
    print(e)
    print("------------------")
    while f<=e:
        mid = int((e+f)/2)
        print(mid)
        if nums[mid]==target:
            return mid
        elif nums[mid]>target:
            e=mid-1
        else:
            f=mid+1
    return -1
print("--------------------------------------")
print(search(nums,target))
